A port city on the Gulf of Riga that is the capital and largest city of Latvia; formerly a member of the Hanseatic League